package com.cakin.demo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

/**
 * @className: Dog
 * @description: 实体类，演示松散绑定
 * @date: 2020/6/9
 * @author: cakin
 */
@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
@ConfigurationProperties("dog")
// JSR303注解
@Validated
public class Dog {
    // @Email(message = "邮箱错误了")
    private String lastName;
    private Integer age;
}
